package com.dao.impl;

import com.dao.UserDao;
import com.util.MD5;
import com.models.User;
import org.junit.Test;

/**
 * Created by TimeLiar on 2015/9/24.
 * Biu~~Biu~~~Biu~~~~
 */
public class UserDaoImplTest {

    @Test
    public void testAddUser() throws Exception {
        User user = new User();
        user.setUsername("admin");
        user.setPassword(MD5.getMD5Code("admin"));
        UserDao userDao = new UserDaoImpl();
        userDao.updateUser(user);
    }

    public void testDeleteUser() throws Exception {

    }

    public void testUpdateUser() throws Exception {

    }

    @Test
    public void testGetUser() throws Exception {
        User user = new UserDaoImpl().getUser("admin");
        System.out.println(user);
    }
}